﻿using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;


namespace KineBall
{
    public class Camera
    {
        public Matrix View
        {
            get
            {
                return Matrix.CreateLookAt(Position, Target, Up);
            }
        }

        public Matrix Projection { get; set; }

        public Vector3 Position { get; set; }
        public Vector3 Target { get; set; }
        public Vector3 Up { get; set; }

        public Camera()
        {

        }

        public void Initialize(Vector3 position, Vector3 target, Vector3 up, GraphicsDevice graphicsDevice)
        {
            Position = position;
            Target = target;
            Up = up;
            Projection = Matrix.CreatePerspectiveFieldOfView(MathHelper.PiOver2, graphicsDevice.Viewport.AspectRatio, 1f, 100f);
        }
    }
}
